import request from '@/utils/request'

/* 列表分页*/
export function selectOsOrderPage(data) {
  return request({
    url: '/erp/osOrder/selectOsOrderPage',
    method: 'post',
    data: data
  })
}

/* 查询订单状态数量*/
export function selectOsOrderStateCount(data) {
  return request({
    url: '/erp/osOrder/selectOsOrderStateCount',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveOsOrder(data) {
  return request({
    url: '/erp/osOrder/saveOsOrder',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateOsOrderById(data) {
  return request({
    url: '/erp/osOrder/updateOsOrderById',
    method: 'post',
    data: data
  })
}

/* 根据id查询*/
export function selectOsOrderById(data) {
  return request({
    url: '/erp/osOrder/selectOsOrderById/' + data,
    method: 'post'
  })
}

/* 删除*/
export function deleteOsOrder(data) {
  return request({
    url: '/erp/osOrder/deleteOsOrder',
    method: 'post',
    data: data
  })
}

/* 取消 */
export function cancelOrder(data) {
  return request({
    url: '/erp/osOrder/cancel/' + data,
    method: 'post'
  })
}

/* 完成外发订单 */
export function completeOrder(data) {
  return request({
    url: '/erp/osOrder/complete',
    method: 'post',
    data: data
  })
}

